from django.http import HttpResponse
from django.shortcuts import render

# Create your views here.
def index(request):
    return HttpResponse("")

def set_cookie(request):
    response = HttpResponse("set_cookie")
    response.set_cookie("name", "clay", max_age=30)
    return response

def get_cookie(request):
    print(request.COOKIES)
    print(request.COOKIES.get("name"))
    return HttpResponse("get_cookie")

def del_cookie(request):
    response = HttpResponse("del_cookie")
    response.set_cookie("name", "clay", max_age=0)
    return response